<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
	pageEncoding="ISO-8859-1"%>

<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt" %>
<%@ taglib uri="http://www.springframework.org/tags/form" prefix="form" %>

<%@ include file="../general/header.jsp" %>

	<div id="header">${title}</div>
	<%@ include file="../general/menu.jsp" %>
		<div id="content">
		<form:form method="POST" action="${action}" commandName="itemForm">

			<input type="hidden" id="itemid" name="itemid" value="${itemid}" />
			
			<span>Item Name: </span>
			<form:input path="name" /><br />
			<form:errors path="name" />
			
			<span>Description: </span>
			<form:input  path="description" /><br />
			<form:errors path="description" />
			
			<span>Price: </span>
			<form:input  path="precio" /><br />
			<form:errors path="precio" />
						
			<span>Stock: </span>
			<form:input path="count" /><br />
			<form:errors path="count" />
			
			<span>Category: </span>
				<form:select path="category">
					<form:options items="${categories}" itemValue="id" itemLabel="name" />
				</form:select>
			<form:errors path="category" />
			
			<span>New Item: </span>
			<form:checkbox path="newItem" /><br />
			<form:errors path="newItem" />
			
			<span>Publish Priority: </span>
			<form:checkbox path="priority" /><br />
			<form:errors path="priority" />
			
			<input type="submit" value="Save" />
		</form:form>
	</div>
	<div id="bottom">
		<span class="inline spaced">
			<a class="color" href="../general/index">Go back to index</a>
		</span>
	</div>
	<%@ include file="../general/footer.jsp" %>